<template>
	<view>
		<web-view v-if="bool===true" :update-title="false" :webview-styles="webviewStyles" :src="webviewUrl"></web-view>
	</view>
</template>
<script>
	import {
		urls
	} from '@/utils/config'
export default {
	data() {
		return {
			webviewUrl: '',
			bool:false,
			webviewStyles: {
				progress: {
					color: '#FF7200'
				}
			}
		};
	},
	onLoad(params) {
		let that = this;
		setTimeout(function(){
			if(params.type==='home'){
				that.webviewUrl = params.url;
			}else{
				that.webviewUrl = `${urls.WatchPdfUrl}/pdf/web/viewer.html?file=${encodeURIComponent(params.url)}`;
			}
			console.log(that.webviewUrl,'that.webviewUrl')
			that.bool = true
		},100)
	}
};
</script>
<style lang="scss">
	
</style>
